=begin pod

=TITLE class WrapHandle

=SUBTITLE Holds all information needed to unwrap a wrapped routine.

class WrapHandle { ... }

C<WrapHandle> is created and returned by L<wrap|/type/Routine#method_wrap>. Its only use is to unwrap wrapped routines. Either call L<unwrap|/type/Routine#method_unwrap> on a routine object or call the method C<restore> on a C<WrapHandle> object.

    sub f() { say 'f was called' }
    my $wrap-handle = &f.wrap({ say 'before'; callsame; say 'after' });

    f;
    $wrap-handle.restore;
    f;
    # OUTPUT: «before␤f was called␤after␤f was called␤»

=head1 Methods

=head2 method restore

    method restore(--> Bool:D)

Unwraps a wrapped routine and returns C<Bool::True> on success.

=end pod

# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
